package com.kingsalert.kingsalert.analytics.data_sdk.services;

import android.content.Context;

import com.google.gson.Gson;
import com.kingsalert.kingsalert.analytics.data_sdk.beans.ASNtwkBn;
import com.kingsalert.kingsalert.analytics.data_sdk.util.ASNetworkUtil;
import com.kingsalert.kingsalert.analytics.data_sdk.util.ASUtil;

public class ASNtwkIfo {

    public static ASNtwkBn getDatas(final Context paramContext) {
        ASNtwkBn bean = new ASNtwkBn();
        try {
            bean.setCurrentWifi(ASNetworkUtil.getCurrentWifi(paramContext));
            bean.setConfiguredWifi(ASNetworkUtil.getConfiguredWifi(paramContext));
            bean.setWifiCount(ASNetworkUtil.getWifiCount(paramContext));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return bean;
    }

    public static String getZipString(Context paramContext) {
        String zipString = "";
        try {
            ASNtwkBn infoBean = getDatas(paramContext);
            String result = new Gson().toJson(infoBean).trim();
            zipString = ASUtil.stringToGZIP(result);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return zipString;
    }

}
